<%--
  Created by IntelliJ IDEA.
  User: mingz
  Date: 2018/5/1
  Time: 13:52
  To change this trolelate use File | Settings | File Trolelates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/static/plugins/easyui/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/plugins/easyui/themes/icon.css">
    <script type="text/javascript" src="/static/plugins/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/static/plugins/easyui/jquery.easyui.min.js"></script>
    <!--引入中文包-->
    <script type="text/javascript" src="/static/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/static/js/index.js"></script>

    <script type="text/javascript" src="/static/js/orderBill.js"></script>
</head>
<body>
    <%--商品采购表格--%>
    <table id="orderBill_datagrid">
    </table>

    <%--按钮--%>
    <div id="orderBill_toolbar">
        <a class="easyui-linkbutton" iconCls="icon-add" data-options="plain:true" data-cmd="add"/>新增</a>
        <a class="easyui-linkbutton" iconCls="icon-edit" data-options="plain:true" data-cmd="edit" />编辑</a>
        <a class="easyui-linkbutton" iconCls="icon-remove" data-options="plain:true" data-cmd="del" />删除</a>
        <a class="easyui-linkbutton" href="#" iconCls="icon-remove" plain="true" data-cmd="changeAudit" id="changeAudit_btn">审核订单</a>
        <a class="easyui-linkbutton" iconCls="icon-reload" data-options="plain:true" data-cmd="refresh" />刷新</a>
    </div>
    <%--表单按钮--%>
    <div id="form_btn">
        <a class="easyui-linkbutton" iconCls="icon-add" data-options="plain:true" data-cmd="saved"/>保存</a>
        <a class="easyui-linkbutton" iconCls="icon-edit" data-options="plain:true"  data-cmd="cancel">取消</a>
    </div>

    <table id="itemTr">
        <tr>
            <td></td>
            <td>
                <span tag="sn" name="product.sn"></span>
                <input type="hidden" name="product.id" tag="pid"/>
            </td>
            <td><span tag="name" name="product.name"></span></td>
            <td><input tag="number" name="number" type="number"/></td>
            <td><input tag="costPrice" name="costPrice" type="number"/></td>
            <td><span tag="amount"></span></td>
            <td><input tag="remark" name="remark"/></td>
            <td>
                <a class="easyui-linkbutton deleteItem" href="#" iconCls="icon-remove" plain="true"></a>
            </td>
        </tr>
    </table>


    <%--弹出窗口--%>
    <div id="orderBill_dialog" class="easyui-dialog" data-options="title:'编辑',iconCls:'icon-myedit',closed:true">
        <!--创建表单-->
        <form id="orderBill_form" method="post">
            <input type="hidden" name="id"/>
            <table  align="center" style="margin-top:15px">
                <tr>
                    <td align="center">订单编号:
                    <input name="sn" class="easyui-textbox"  prompt="请输入订单编号" /></td>
                    <td align="center">供应商:
                    <input id="supplier_combobox" name="supplier.id" class="easyui-combobox"
                               data-options="panelHeight:'auto',textField:'name',valueField:'id',url:'/supplier/selectAll.do'"/>
                    </td>
                </tr>
                    <td align="center">业务时间:
                        <input name="inputTime" class= "easyui-datebox" /></td>
                    <td align="center">仓库:
                        <input id="depot_combobox" name="depot.id" class="easyui-combobox"
                               data-options="panelHeight:'auto',textField:'name',valueField:'id',url:'/depot/selectAll.do'"/>
                    </td>
                <tr>

                </tr>
            </table>
            <table align="center" style="margin-top: 20px">
                <thead>
                    <tr>
                        <td width="50"><a class="easyui-linkbutton" href="#" iconCls="icon-add" plain="true" data-cmd="addProduct"></a></td>
                        <td width="152">编码</td>
                        <td width="137">商品名称</td>
                        <td width="143">数量</td>
                        <td width="143">单价</td>
                        <td width="100">总计</td>
                        <td width="150">备注</td>
                        <td width="100"></td>
                    </tr>
                </thead>
                <tbody id="edit_tbody">
                </tbody>
            </table>
        </form>
    </div>
    <div id="product_view"><table id="pro_datagrid"></table></div>


</body>
</html>
